/*处理登录用户权限的页面*/
import request from '@/helpers/request'
// import { JSEncrypt } from 'jsencrypt' //RSA加密传输
// import querystring from 'querystring' //序列化请求参数
import { format } from 'util';

let formatData = (data) => {
    return querystring.stringify(data)
}//序列化请求参数 封装函数

const URL = {
    getList:'/c8b01226-b4fa-4775-941f-b8a5c9bc099b',
    getImg:"/c8b01226-b4fa-4775-941f-b8a5c9bc099b?photo="
}

export default {
    getList(param){
        return request(URL.getList + `?chatid=${param.chatid}&page=${param.page}`, 'GET', {} , { isToken: false })
    },
    getImg(id){
        return request(URL.getImg + id, 'GET', {} , { isToken: false })
    }
    // https://tgbot-octwebserver.sauween.com/c8b01226-b4fa-4775-941f-b8a5c9bc099b?photo=AgACAgUAAx0CWEQ-EQACY7BfMOMCWzo37f7Gx0VyoNoJqqmgDwACQaoxGyS8iFUrXntI2ZmKv2y6Zmt0AAMBAAMCAANtAAONDQUAARoE
    // putPhone(phone) {
    //     console.log( phone)
    //     return request(URL.putPhone, 'POST', formatData({phone}), { isToken: false })
    // },
    // addGame(param){
    //     return request(URL.addGame, 'POST', formatData(param), { isToken: false })
    // },
    // getPhoto(){
    //     return request(URL.getPhoto, 'GET', {}, { isToken: false })
    // },
    // getPhotoById(id){
    //     return request(URL.getPhotoById, 'GET', {id}, { isToken: false })
    // }

}